<template>
  <SelectFilter v-if="name == '多选过滤'" data="多选过滤" :popoverIndex="popoverIndex" @close="closeHandler" @item_click="itemClickHandler"></SelectFilter>
  <HeightChoose v-if="name == '高度'" data="高度" :popoverIndex="popoverIndex" @close="closeHandler" @item_click="itemClickHandler"></HeightChoose>
  <AreaChoose
    v-if="name == '区域'"
    data="区域"
    :popoverIndex="popoverIndex"
    :visible="visible"
    @close="closeHandler"
    @item_click="itemClickHandler"
  ></AreaChoose>
  <TimeChoose v-if="name == '时间'" data="时间" :popoverIndex="popoverIndex" @close="closeHandler" @item_click="itemClickHandler"></TimeChoose>
  <WaterUI v-if="name == '水行业'" data="水行业" :popoverIndex="popoverIndex" @close="closeHandler" @item_click="itemClickHandler"></WaterUI>
  <CompEchart v-if="name == 'Echarts'" data="Echarts" :popoverIndex="popoverIndex" @close="closeHandler" @item_click="itemClickHandler"></CompEchart>
  <CompElementUI v-if="name == 'Element'" data="Element" :popoverIndex="popoverIndex" @close="closeHandler" @item_click="itemClickHandler"></CompElementUI>
  <CompList v-if="name == '列表项'" data="列表项" :popoverIndex="popoverIndex" @close="closeHandler" @item_click="itemClickHandler"></CompList>
  <CompDtsMarker v-if="name == '撒点'" data="撒点" :popoverIndex="popoverIndex" @close="closeHandler" @item_click="itemClickHandler"></CompDtsMarker>
  <CompDtsCO v-if="name == 'CustObj'" data="CustObj" :popoverIndex="popoverIndex" @close="closeHandler" @item_click="itemClickHandler"></CompDtsCO>
  <CompDtsOther v-if="name == 'DtsOther'" data="DtsOther" :popoverIndex="popoverIndex" @close="closeHandler" @item_click="itemClickHandler"></CompDtsOther>
</template>

<script setup lang="ts">
import SelectFilter from './comp/SelectFilter.vue'
import HeightChoose from './comp/HeightChoose.vue'
import AreaChoose from './comp/AreaChoose.vue'
import TimeChoose from './comp/TimeChoose.vue'
import WaterUI from './comp/WaterUI.vue'
import { onMounted } from 'vue'

const emit = defineEmits(['close', 'item_click'])

const props = defineProps({
  visible: {
    type: Boolean,
    required: true
  },
  name: {
    type: String,
    required: true
  },
  popoverIndex: {
    type: Number,
    required: true
  }
})

// 关闭窗口
function closeHandler(e: any) {
  emit('close', e)
}

// 窗口点击
function itemClickHandler(result: any) {
  emit('item_click', result)
}

onMounted(() => {})
</script>

<style scoped lang="scss"></style>



 